import { IsDefined, IsNotEmpty, IsString } from "class-validator";
import { BaseEntity } from "../BaseEntity";
import { Model } from "sequelize";

export default class SysParamsSettingEntity extends BaseEntity {
  public id?: number;

  @IsString()
  @IsNotEmpty()
  @IsDefined()
  public paramsName: string;

  @IsString()
  @IsNotEmpty()
  @IsDefined()
  public paramsCode: string;

  @IsString()
  @IsNotEmpty()
  @IsDefined()
  public paramsValue: string;

  @IsString()
  public remark: string;

  public static transform(plainObject: object): SysParamsSettingEntity {
    return super.baseTransform(SysParamsSettingEntity, plainObject);
  }
}

export interface ISysParamsSettingModel extends Model<SysParamsSettingEntity> {}
